﻿using DevExpress.XtraGrid.Demos.util;
using mendian;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DXApplicationTangche.UC.圣同润.Service
{
    public class 达人Service
    {
        /// <summary>
        /// 获取达人信息一览
        /// </summary>
        /// <returns></returns>
        public static List<ChanmamaAuthorInfoDTO> getChanmamaAuthorInfoList()
        {
            return
                FunctionHelper.JsonDeserialization<List<ChanmamaAuthorInfoDTO>>(
                    RestCall.httpGetMethod(
                       ConnectDTO.接口url + "/author/getChanmamaAuthorInfoList"
                    )
                );
        }

        /// <summary>
        /// 获取达人信息一览
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public static ChanmamaAuthorDetailDTO getChanmamaAuthorDetailInfoById(String id)
        {
            return
                FunctionHelper.JsonDeserialization<ChanmamaAuthorDetailDTO>(
                    RestCall.httpGetMethod(
                       ConnectDTO.接口url + "/author/getChanmamaAuthorDetailInfoById?id=" + id
                    )
                );
        }
    }
    public class ChanmamaAuthorDetailDTO
    {
        public String avatar { get; set; }  //  头像
        public String mcn_name { get; set; }    //  MCN机构名
        public String province { get; set; }    //  省份
        public String city { get; set; }    //  地区
        public int digg_incr { get; set; }  //  月点赞增量
        public int aweme_count { get; set; }
        public int share_incr { get; set; }
        public int history_aweme_count { get; set; }    //  历史总视频数
        //public ChanmamaAuthorSingleTagsDTO single_tags { get; set; }
        public Boolean is_author_live_topic_monitor { get; set; }
        public long total_favorited { get; set; }
        public int is_fav { get; set; }
        public int follower_incr { get; set; }  //  粉丝月增长量
        public int mark_delete { get; set; }
        //public ChanmamaAuthorSalesRankDTO author_sales_rank { get; set; }
        public String live_room_scheduled_time { get; set; }
        //public ChanmamaAuthorFollowerCountTrendDTO follower_count_trend { get; set; }
        public String verify_name { get; set; } //  认证信息
        public int start_index { get; set; }
        public int pay_score { get; set; }
        public String product_label { get; set; }   //
        public Boolean is_aweme_bring_product_author { get; set; }  //  是否视频带货
        public Boolean is_live_bring_product_author { get; set; }   //  是否直播带货
        public Boolean is_aweme_monitor { get; set; }
        public String self_shop_name { get; set; }
        public int verification_type { get; set; }
        public String live_room_id { get; set; }    //  直播间id
        public long fans_club_total { get; set; }   //  粉丝团数
        public int total_room_ticket_count { get; set; }
        public Boolean is_aweme_author { get; set; }    //  是否原创视频作者
        public String self_brand_code { get; set; } //  自有品牌编码
        public String self_brand_name { get; set; } //  自有品牌名
        public String month_avg_live_amount_text { get; set; }  //  月场均销售额—根据公开渠道获取的基础数值，GMV估算并非准确数据
        public String month_live_amount_text { get; set; }  //  平均月销售额
        public String author_id { get; set; }
        public long update_time { get; set; }
        public int expense { get; set; }
        public String official_mcn_id { get; set; } //  mcn机构id
        //public List<ChanmamaAuthorSpreadCategoryDTO> spread_category { get; set; }  //  主营类型
        public String nickname { get; set; }    //  达人名称
        public String birthday { get; set; }
        public int live_room_status { get; set; }
        public Boolean is_live_room_monitor { get; set; }
        public int commerce { get; set; }
        public int fans_group { get; set; }
        public String label { get; set; }   //  达人标签
        public int is_notice { get; set; }
        public int comment_incr { get; set; }
        public Boolean is_brand_self_author { get; set; }
        public String short_id { get; set; }
        public int total_share { get; set; }
        public int income { get; set; }
        public String brand_self_code { get; set; }
        public Boolean is_shop_author { get; set; }
        public int gender { get; set; } //  性别
        public int total_comment { get; set; }
        public int month_avg_live_amount { get; set; }
        public int month_live_count { get; set; }   //  直播场次
        public int product_count { get; set; }
        public String url { get; set; }
        public Boolean is_live_author { get; set; }
        public Boolean bring_products_30 { get; set; }
        public int author_step_status { get; set; }
        public int mcn_id { get; set; }
        //public ChanmamaAuthorReputationDTO reputation { get; set; } //  带货口碑
        public int month_live_amount { get; set; }
        public String manual_label { get; set; }
        public String unique_id { get; set; }
        public int following_count { get; set; }
        public int show_following_follower { get; set; }
        public int bring_product_ability_level { get; set; }
        public int main_bring_product_type { get; set; }
        public Boolean is_data_refreshing { get; set; }
        public String signature { get; set; }   //  达人简介
        public long follower_count { get; set; }    //  粉丝数
        public String web_url { get; set; } //  达人主页
        //public ChanmamaAuthorFansRankDTO author_fans_rank { get; set; }
        public int common_ability_level { get; set; }
        public long crawl_time { get; set; }
        public String self_shop_id { get; set; }
        //  一览里的信息
        public Double aweme_digg_follower_ration { get; set; }  //  平均赞粉比   TODO
        public long live_average_user_30 { get; set; }  //  月直播平均场观 TODO
        public int aweme_avg_digg_count_30 { get; set; }    //  平均点赞数   TODO
        public ChanmamaAuthorDetailDTO()
        {

        }
    }
    public class ChanmamaAuthorInfoDTO
    {
        public String author_type { get; set; } //  达人类别
        public int aweme_product_count_30 { get; set; } //  30天视频带货数量
        public int click_event { get; set; }
        public Boolean bring_products_30 { get; set; }  //  30天内是否带货
        public int aweme_avg_play_count_30 { get; set; }
        public String live_room_id { get; set; }    //  最新直播间id
        public int live_room_status { get; set; }   //  直播间状态   TODO    每个数值都是啥
        public int bring_aweme_count_30 { get; set; }   //  带货视频数
        public String total_amount_30_text { get; set; }    //  总销售额
        public String nickname { get; set; }    //  达人名称
        public int digg_incr { get; set; }
        public int total_amount_30 { get; set; }
        public int product_count { get; set; }
        public int author_step_status { get; set; }
        public int product_video_count { get; set; }
        public Double reputation_score { get; set; }    //  带货口碑
        public String with_goods_category_v_6 { get; set; }
        public int aweme_total_amount_30 { get; set; }
        public int author_aweme_count_30 { get; set; }
        public String live_total_amount_30_text { get; set; }   //  总销售额
        public Double live_average_interact_30 { get; set; }
        public Double aweme_digg_follower_ration { get; set; }  //  平均赞粉比   TODO
        public long live_average_user_30 { get; set; }  //  月直播平均场观 TODO
        public String id { get; set; }
        public int aweme_digg_medium { get; set; }
        public String reputation_recent_sales { get; set; }
        public Double live_rate_30 { get; set; }
        public int verification_type { get; set; }
        public String short_id { get; set; }
        public int live_average_amount_30 { get; set; }
        public String live_average_amount_30_v2_text { get; set; }
        public String author_id { get; set; }
        public int is_fav { get; set; }
        public String unique_id { get; set; }
        public String aweme_total_amount_30_text { get; set; }
        public int gender { get; set; }
        public long follower_count { get; set; }    //  粉丝总数
        public long live_pv_medium { get; set; }
        public int collect_process_status { get; set; }
        public int aweme_avg_digg_count_30 { get; set; }    //  平均点赞数   TODO
        public int aweme_count { get; set; }
        public int live_average_volume_30 { get; set; }
        public Double live_average_online_30 { get; set; }
        public String avatar { get; set; }  //  头像
        public String label { get; set; }
        public Double reputation_percentage { get; set; }
        public Boolean bring_live_products { get; set; }
        public int live_count_30 { get; set; }  //  直播场次
        public String live_average_amount_30_text { get; set; }
        public int mark_delete { get; set; }
        public int reputation_level { get; set; }
        public int live_average_amount_30_v2 { get; set; }
        public Double live_average_uv_30 { get; set; }
        public Double aweme_ipm_30 { get; set; }
        public Double aweme_gpm_30 { get; set; }
        public long total_favorited { get; set; }
        public int follower_incr { get; set; }  //  月粉丝增量
        public int commerce { get; set; }
        public String with_goods_category { get; set; }
        public int live_total_amount_30 { get; set; }
        public String single_tags_first { get; set; }   //  达人类型
        public List<String> single_tags_second { get; set; }    //  达人类型二级
        public Boolean single_tags_primary { get; set; }
        //  详细信息
        public String verify_name { get; set; } //  认证信息
        public long fans_club_total { get; set; }   //  粉丝团数
        public String self_brand_name { get; set; } //  自有品牌名
        public String month_avg_live_amount_text { get; set; }  //  月场均销售额—根据公开渠道获取的基础数值，GMV估算并非准确数据
        public String signature { get; set; }   //  达人简介
        public String web_url { get; set; } //  达人主页
                                            //  主营类型
        public Double rate { get; set; }
        public String title { get; set; }
        //  时间
        public String createDate { get; set; }
        public DateTime createDateTime { get; set; }
        public ChanmamaAuthorInfoDTO()
        {

        }
    }
}
